<div class="bigtitle"><?=lang('usermanagement_title')?> &gt; <?=lang('label_addnew')?></div>
<table class='tblcontent' cellspacing='0' cellpadding='0' border='0'>
	<tr>
		<td>
			<?=form_open(site_url('usermanagement/addnew'),array('name'=>'frm','onsubmit'=>'return f_validate()'),array('hidden_status'=>''))?>			
			<table class='tblinputform' cellspacing='1' cellpadding='2' border='0' width='50%'>
				<tr>
					<th width='20%'><?=lang('usermanagement_username')?></th>
					<td width='80%'><input type='text' name='txt_username' style='width:300px;' maxlength='50' value="<?=$profile->username?>"/></td>
				</tr>
                <tr>
					<th><?=lang('usermanagement_password')?></th>
					<td><input type='password' name='txt_password' style='width:300px;' maxlength='50' value=""/></td>
				</tr>				
				<tr>
					<th><?=lang('usermanagement_firstname')?></th>
					<td><input type='text' name='txt_firstname' style='width:300px;' maxlength='50' value="<?=htmlspecialchars($profile->firstname)?>"/></td>
				</tr>
				<tr>
					<th><?=lang('usermanagement_lastname')?></th>
					<td><input type='text' name='txt_lastname' style='width:300px;' maxlength='50' value="<?=htmlspecialchars($profile->lastname)?>"/></td>
				</tr>
				<tr>
					<th><?=lang('usermanagement_phone')?></th>
					<td><input type='text' name='txt_phone' style='width:300px;' maxlength='50' value="<?=$profile->phone?>"/></td>
				</tr>
				<tr>
					<th><?=lang('usermanagement_email')?></th>
					<td><input type='text' name='txt_email' style='width:300px;' maxlength='100' value="<?=$profile->email?>"/></td>
				</tr>
			</table>
			<div class='ctrlbtn'>
				<input type='button' name='btn_save' value='<?=lang('label_save')?>' onclick='return f_validate()'/>	
				<input type='button' name='btn_cancel' value='<?=lang('label_cancel')?>' onclick='window.location="<?=site_url('usermanagement')?>";'/>                
			</div>
            <div class='alertmsg'><?=$profile->alertmsg?></div>
			<?=form_close()?>
		</td>
	</tr>
</table>
<script type='text/javascript'>
	f_onload();
	function f_onload(){ document.frm.txt_username.focus();}
	function f_validate(){
		form = document.frm;
		if(form.txt_username.value==''){
			alert("<?=lang('usermanagement_js_inputusername')?>");
			form.txt_username.focus();
			return false;
		}
		if(form.txt_password.value==''){
			alert("<?=lang('usermanagement_js_inputpassword')?>");
			form.txt_password.focus();
			return false;
		}		
		form.submit();
	}
</script>